package com.tanjun.gateway.gatewayservice.config;

import cn.dev33.satoken.stp.StpLogic;
import com.tanjun.common.enums.user.UserTypeEnum;

public class StpUtilKit {
    /**
     * 管理员登录
     */
    public static final StpLogic adminStpLogic=new StpLogic(UserTypeEnum.ADMIN.getCode());

    /**
     * 会员登录
     */
    public static final StpLogic memStpLogic=new StpLogic(UserTypeEnum.MEM.getCode());


    /**
     * 退出登录
     */
    public static void logout(){
        if(adminStpLogic.isLogin()){
            adminStpLogic.logout();
        }
        if(memStpLogic.isLogin()){
            memStpLogic.logout();
        }
    }

}
